import { DataSourceTypeEnum, DataSourceTypeByDateEnum} from "@src/globalData/enum"

/**d-1日、d日 d+1日  三者的区分 数据类别区分 */
export const dataCategory =  {
  /**d-1日 */
  [DataSourceTypeByDateEnum.D_REDUCE_DATE]:[
    DataSourceTypeEnum.ACT_MARKET_INFO,
    DataSourceTypeEnum.ACT_BACKUP_INFO,
    DataSourceTypeEnum.ACT_NODE_PRICE_INFO,
    DataSourceTypeEnum.ACT_USER_PRICE_INFO,
    DataSourceTypeEnum.ACT_POWER,
    DataSourceTypeEnum.ACT_NODE_AVG_PRICE_INFO
  ],
  /**d日 */
  [DataSourceTypeByDateEnum.D_DATE]:[
    DataSourceTypeEnum.REALTIME_BACKUP_PREDICT_INFO, 
    DataSourceTypeEnum.REALTIME_MARKET_INFO, 
    DataSourceTypeEnum.REALTIME_BACKUP_INFO,
    DataSourceTypeEnum.REALTIME_USER_PRICE_INFO,
    DataSourceTypeEnum.REALTIME_NODE_PRICE_INFO
  ],
  /**d+1日 */
  [DataSourceTypeByDateEnum.D_ADD_DATE]:[
    DataSourceTypeEnum.AHEAD_PUMPED_BEFORE_INFO, 
    DataSourceTypeEnum.AHEAD_MARKET_AFTER_INFO,
    DataSourceTypeEnum.AHEAD_NODE_PRICE_INFO,
    DataSourceTypeEnum.AHEAD_MARKET_BEFORE_INFO,
    DataSourceTypeEnum.AHEAD_USER_PRICE_INFO,
    DataSourceTypeEnum.AHEAD_OFFON_INFO,
    DataSourceTypeEnum.AHEAD_POWER,
    DataSourceTypeEnum.AHEAD_NODE_AVG_PRICE_INFO,
    DataSourceTypeEnum.AHEAD_REGULATED_INFO
  ]
} 


/**用于 记录请求 d-1日、d日 d+1日  三者接口的数量*/
export const dataCategoryLength =  {
  /**d-1日 */
  [DataSourceTypeByDateEnum.D_REDUCE_DATE]:0,
  /**d日 */
  [DataSourceTypeByDateEnum.D_DATE]:0,
  /**d+1日 */
  [DataSourceTypeByDateEnum.D_ADD_DATE]:0
} 

// ods_trading_sd_etrm_spider_act_inc
// ods_trading_sd_etrm_spider_ahead_inc
// ods_trading_sd_etrm_spider_realtime_inc
// LVoKIF0DEdnr8MNWn6M/iBg/TqmVJWzH5mTx75Y27Syd1gqRIbg8JtM8aq6BWJDH
// LVoKIF0DEdnr8MNWn6M/iBebk1JZj6BK7X2VlNKKO6AHXbRHfhWWPoJAQ9QAcWyv
// LVoKIF0DEdnr8MNWn6M/iB2pA3NcWKbXSJErRA/hp/p6kY8LIOw65Flp7E49n1uo

export const getDefaultDataBaseData = () => ([
  {
    business_time: "",
    source_identity: import.meta.env.VITE_APP_SOURCE_ID,
    data: {}
  }
])

/** 调用云脑保存接口的入参模板 */
export const sendParamsStructure = {
  /**D-1日 */
  [DataSourceTypeByDateEnum.D_REDUCE_DATE]:{
    // table: "ods_trading_sd_etrm_spider_act_inc",
    table: 'LVoKIF0DEdnr8MNWn6M/iBg/TqmVJWzH5mTx75Y27Syd1gqRIbg8JtM8aq6BWJDH',
    data: getDefaultDataBaseData()
  },
  /**D日 */
  [DataSourceTypeByDateEnum.D_DATE]:{
    // table: "ods_trading_sd_etrm_spider_realtime_inc",
    table: 'LVoKIF0DEdnr8MNWn6M/iB2pA3NcWKbXSJErRA/hp/p6kY8LIOw65Flp7E49n1uo',
    data: getDefaultDataBaseData()
  },
  /**D+1日 */
  [DataSourceTypeByDateEnum.D_ADD_DATE]:{
    // table: "ods_trading_sd_etrm_spider_ahead_inc",
    table: 'LVoKIF0DEdnr8MNWn6M/iBebk1JZj6BK7X2VlNKKO6AHXbRHfhWWPoJAQ9QAcWyv',
    data: getDefaultDataBaseData()
  }
}


/**云脑的登录账号密码 */
export const yunNaoAccount = {
  username: import.meta.env.VITE_APP_YUN_NAO_USERNAME,
  password: import.meta.env.VITE_APP_YUN_NAO_PASSWORD,
  authCode: ''
}